#ifndef __GEOMETRY_H__
#define __GEOMETRY_H__
#include <Length.h>

struct Geometry
{
    virtual
    ~Geometry()
    {
    }

    virtual double
    getArea(const Length&, const Length&) const=0;

    virtual double
    getPerimeter(const Length&, const Length&) const=0;

    virtual bool
    isValid() const = 0;

};

struct ValidGeometry : public Geometry
{
    virtual double
    getArea(const Length&, const Length&) const;

    virtual double
    getPerimeter(const Length&, const Length&) const;

    virtual bool
    isValid() const;
};

struct InvalidGeometry : public Geometry
{
    virtual double
    getArea(const Length&, const Length&) const;

    virtual double
    getPerimeter(const Length&, const Length&) const;

    virtual bool
    isValid() const;
};

Geometry *
getGeometry(const Length&, const Length&);

#endif

